#ifndef ADDRESS_H
#define ADDRESS_H

#include "orm.h"

class Address : public ORMObject
{
    Q_OBJECT
    Q_PROPERTY(QString street READ street WRITE setStreet)
    Q_PROPERTY(QString city READ city WRITE setCity)
    Q_PROPERTY(QString country READ country WRITE setCountry)
    Q_PROPERTY(int employee_id READ employeeId WRITE setEmployeeId)

public:
    explicit Address(QObject *parent = nullptr);

    QString street() const;
    void setStreet(const QString &street);

    QString city() const;
    void setCity(const QString &city);

    QString country() const;
    void setCountry(const QString &country);

    int employeeId() const;
    void setEmployeeId(int employeeId);

protected:
    virtual QString tableName() const override { return "addresses"; }

private:
    QString m_street;
    QString m_city;
    QString m_country;
    int m_employeeId;
};

REGISTER_ORM_TYPE(Address)

#endif // ADDRESS_H    